<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <div th:include="Common/common :: head"></div>
    <script type="text/javascript">
        $(function (){
            $("#return").click(function (){
                location.href="http://localhost:8080/games";
            });
        })
    </script>
</head>
<body>
<div id="main-wrapper">
    <!--Header section start-->
    <div th:include="Common/common :: header"></div>
    <!--Header section end-->
    <div class="games-area section pt-85 pt-lg-65 pt-md-55 pt-sm-55 pt-xs-45">
        <div class="container">
    <div class="row" th:if="${game!=null}">
        <div class="col-lg-4 col-md-6">
            <!--Single Game Start-->
            <div class="single-game mb-50">
                <div class="game-img">
                    <a th:href="@{/gamesdetails(id=${game.id})}"><img src="assets/images/game/game1.jpg"
                                                                            th:src="${game.image}"
                                                                            alt=""></a>
                </div>
                <div class="game-content">
                    <h4><a th:href="@{/gamesdetails(id=${game.getId()})}" href=""
                           th:text="${game.getGamename()}"></a>
                    </h4>
                    <span th:text="${game.getPlatform()}"></span>
                    <p align="center"><span th:text="价格+':'+${game.getPrice()}+元"></span></p>
                </div>
            </div>
            <!--Single Game End-->
        </div>
    </div>
        </div>
    </div>
    <div class="row-12" th:if="${error!=null}">
        <h1><center th:text="${error}"></center></h1>
        <button type="button" class="btn btn-primary btn-lg btn-block" id="return">点我返回</button>
    </div>
</div>
</body>
</html>